<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        body{
            margin: 0px;
        }
        #img1{
            width: 375px;
            height: 667px;
        }
        #img2{
            width: 35px;
            height: 35px;
        }
        .context{
            width: 300px;

            height: 200px;

            display: flex;

            flex-direction: row;

            flex-wrap: nowrap;

            justify-content: space-between;
        }
        input{
            border:1px solid #7e86ec;
            outline: none;
            width:78px;
            height:28px;
        }
    </style>
    <script>
        if (! localStorage.getItem('username')) {
            alert('请先登录')
            location.href = './login.html'
        }
    </script>
</head>
<body>
<div style="position:relative;">
    <img id="img1" src="./img/home/img1.png" width="500" height="500" />
    <div style="position:absolute; left:324px; top:13px;">
        <img id="img2"  src="./img/home/img2.png"/>
    </div>
    <div class="context" style="position:absolute; left:36px; top:440px;">
        <div class="list">
<!--            <img src="./img/home/img3.png" width="56px" height="56px" >-->
            <a href="nearby.html"><img src="./img/home/img3.png" width="56px" height="56px"> </a>
            <p>附近设备</p>
        </div>
        <div class="list">
            <img src="./img/home/img4.png" width="56px" height="56px">
            <p>扫码打水</p>
        </div>
        <div class="list">
            <img src="./img/home/img5.png" width="56px" height="56px">
            <p>设备状态</p>
        </div>
    </div>
    <div style="position:absolute; left:111px; top:620px;">
        <input  style="background-color: #7e86ec;color: white"  name="submit" type="submit" value="首页" onclick="window.location.href='./home.html'">
    </div>
    <div style="position:absolute; left:189px; top:620px;">
        <input  style="background-color: white;color: #7e86ec" name="submit" type="submit" value="我的" onclick="window.location.href='./mine.html'">
    </div>
</div>
</body>
</html>